defmodule Servy.Tracker do
  @doc """
  Simulates sending a request to an external API to Get GPS coordinates of a wildthing
  """

  def get_location(wildthing) do
    :timer.sleep(500)
    locations = %{
      "rescoe" => %{ lat: "44.4280 N", lng: "110.5885 W"},
      "smokey" => %{ lat: "24.4280 N", lng: "10.5885 W"},
      "brutus" => %{ lat: "34.4280 N", lng: "90.5885 W"},
      "bigfoot" => %{ lat: "14.4280 N", lng: "80.5885 W"}
    }
    Map.get(locations, wildthing)
  end
end
